package com.medical.app.service;

import com.medical.app.entity.HealthRecord;
import java.time.LocalDate;
import java.util.List;
import java.util.Optional;

public interface HealthRecordService {
    // 整体保存或更新健康记录
    HealthRecord saveOrUpdateHealthRecord(HealthRecord healthRecord);

    // 单独更新身高体重
    HealthRecord updateHeightWeight(Long userId, Double height, Double weight, LocalDate recordDate);

    // 单独更新步数
    HealthRecord updateSteps(Long userId, Integer steps, LocalDate recordDate);

    // 单独更新睡眠时间
    HealthRecord updateSleepHours(Long userId, Double sleepHours, LocalDate recordDate);

    List<HealthRecord> getUserHealthRecords(Long userId);
    Optional<HealthRecord> getHealthRecordByDate(Long userId, LocalDate recordDate);
    Optional<HealthRecord> getLatestHealthRecord(Long userId);
    List<HealthRecord> getHealthRecordsByDateRange(Long userId, LocalDate startDate, LocalDate endDate);
    void deleteHealthRecord(Long id);
    Optional<HealthRecord> findById(Long id);
    long getHealthRecordCount(Long userId);
    List<HealthRecord> getRecentHealthRecords(Long userId, int days);
}